﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace W01
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("输入圆的半径:");
            string r = Console.ReadLine();
            Double num = Convert.ToDouble(r);
            Double pi = 3.14;
            Double s = pi * num * num;
            Console.WriteLine("圆的面积=");
            Console.WriteLine(s);
        }
        public static void Test() 
        {
            while (true) {
                Console.Write("请输入四位数 : ");
                int i = int.Parse(Console.ReadLine());
                if (i <= 9999 && i >= 1000)
                {
                    int a = i / 1000;
                    int b = i / 100 % 10;
                    int c = i % 100 / 10;
                    int d = i % 10;
                    Console.Write("千位为" + a + "百位为" + b + "十位为" + c + "个位为" + d);
                    break;
                }
                else {
                    Console.Write("输入错误，请输入四位数  ");
                }
            }
        }
        public static void Test2() {
            int a;
            int b;
            int c;
            int large;
            Console.Write("请输入第一个数 : ");
            a = Convert.ToInt32(Console.ReadLine());
            Console.Write("请输入第二个数: ");
            b = Convert.ToInt32(Console.ReadLine());
            Console.Write("请输入第三个数 : ");
            c = Convert.ToInt32(Console.ReadLine());
            if (a > b && a > c)
                large = a;
            else if (b > a && b > c)
                large = b;
            else large = c;
            Console.WriteLine("最大数是 {0}", large);
            large = (a > b && a > c) ? a : (b > a && b > c) ? b : c;
            Console.ReadLine();
        }




        }
    }

